package org.Array;

public class ArrayDemo4 {
    public static void main(String[] args) {
        int[] scores = new int[]{12,34,56,73,1,34};
        int max = scores[0];
        for (int i = 1; i < scores.length; i++) {
            if(scores[i]>max){
                max = scores[i];
            }
        }
        System.out.println("数组中的最大值:"+ max);
        System.out.println("====================");
        for (int i = 0,j = scores.length-1; i < j; i++,j--) {
            int temp = 0;
            temp = scores[i];
            scores[i] = scores[j];
            scores[j] = temp;
        }
        for (int i = 0; i < scores.length; i++) {
            System.out.print(scores[i]+" ");
        }
    }
}
